﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="DSHoaDon.aspx.cs"
    Inherits="HoaDon.DSHoaDon" Title="Danh sách hóa đơn" %>

<asp:Content ID="cthoadon" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="gdxdshoadon" runat="server" AutoGenerateColumns="false">
        <Columns>
            <asp:TemplateField HeaderText="Mã tự động">
                <ItemTemplate>
                    <asp:Label ID="Stt_Rec" runat="server" Text='<%# 
Eval("Stt_Rec") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngày ct">
                <ItemTemplate>
                    <asp:Label ID="Ngay_ct" runat="server" Text='<%# 
String.Format("{0: dd/MM/yyyy}", Eval("Ngay_ct")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Bàn">
                <ItemTemplate>
                    <asp:Label ID="vvName" runat="server" Text='<%#
Eval("vvName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tổng tiền">
                <ItemTemplate>
                    <div style="text-align: right;">
                        <asp:Label ID="T_Tien" runat="server" Text='<%#
Eval("T_Tien", "{0:#,#}") %>'></asp:Label>
                    </div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Người tạo">
                <ItemTemplate>
                    <asp:Label ID="user_id0" runat="server" Text='<%# 
Eval("user_id0") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngày tạo">
                <ItemTemplate>
                    <asp:Label ID="datetime0" runat="server" Text='<%# 
String.Format("{0: dd/MM/yyyy}", Eval("datetime0")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Người sửa">
                <ItemTemplate>
                    <asp:Label ID="user_id2" runat="server" Text='<%# 
Eval("user_id2") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngày sửa">
                <ItemTemplate>
                    <asp:Label ID="datetime2" runat="server" Text='<%# 
String.Format("{0: dd/MM/yyyy}", Eval("datetime2")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngày sửa">
                <ItemTemplate>
                    <asp:Button ID="btXem" runat="server" Text='Xem' CommandArgument='<%# 
Eval("Stt_Rec") %>' OnClick="btXem_Click"></asp:Button>
                    <asp:Button ID="btXoa" runat="server" Text='Xóa' CommandArgument='<%# 
Eval("Stt_Rec") %>' OnClick="btXoa_Click"></asp:Button>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
